const gulp = require('gulp'),  //gulp基础库
    concat = require('gulp-concat'),   //js压缩
    cssUglify = require('gulp-minify-css');

gulp.task('js', function() {
    gulp.src('script/*.js') //选择合并的JS
        .pipe(concat('script.js')) //合并js
        .pipe(gulp.dest('src/static/js')) //输出
});

gulp.task('css', function () {
    gulp.src('css/init.css')
        .pipe(cssUglify())
        .pipe(gulp.dest('src/static/css'));
});

gulp.task('default', ['js', 'css']);